PSCORE
A Cricket Scoring Application for PSION's Series 3a, 3c, 3mx
and Siena computers
Version 2.3a
 B.G. Fowler 1997-9
The author does not give, or imply, any warranties or guarantees, regarding
the use of this software and will not be liable for any loss or damage
incurred thereby.
This application is made available as shareware only. In order to register
your version and be able to make full use of all it's functionality, please
refer to the accompanying document REGISTER.TXT

USER GUIDE
This guide assumes the reader understands the game of cricket, it's laws,
and the communication signals between umpires and scorers. It does not
attempt to explain the game or how to score one. Full menu and online help
facilities are available to provide assistance on how to use the application.
On some screens and dialogs, names have been abbreviated in order to fit
them on. They appear in full in the edit dialogs and in the print files.

Registration:
Until the application has been registered, a dialog is  displayed initially,
asking whether you want to register. On entering Y, a further dialog is
displayed allowing the registration code and associated name to be entered.
Future uses of the application will merely result in a message confirming
the copy is  registered, together with the version and copyright details.

Initial:
On entry to the application a series of dialogs is displayed, allowing the
scorer to enter the following details about the match and the first innings.
These details are used on the scorecard and scorebook prints and set up
internal variables used during the game.
	Description of match (M)
	Home team name (M)
	Away team name (M)
	Venue (M)
	Date(s) (M)
		Defaults to current date, but can be changed for matches of
		more than one day's duration. The date is abbreviated on a
		Siena's display, but appears in full on the print files. Any
		change to the default date will display and print exactly as
		input.		 
	Umpires' names (M)
	Scorers' names (M)
	Which team won the toss (M)
		If either team name has not been entered, this is suppressed.
	Type of match, (limited overs or time)
		Failure to input limited overs, and the number of overs,
		will result in the innings not being completed automatically
		by the computer after the requisite number of overs have
		been bowled.
	Number of balls in an over (6 or 8)
	Extras
	    Wides
	    No balls
	    Runs scored
		These are the default extras the computer will add on for
		wides and no balls, when the batsmen have not run. For
		matches where penalty runs are added regardless of whether
		or not runs are scored, set Runs scored to 'include',
		otherwise leave it at 'ignore'. e.g. If a no ball went for
		4 byes; set to 'ignore', 4 no balls would be scored; set
		to 'include', 4 + penalty no balls would be scored. Penalty
		wides and penalty no balls are controlled separately to
		provide flexibility.
	Innings of (I)
		If either team name has not been entered, this is suppressed.
	Scorecard filename
		The name of the file that the current scorecard is written
		to at the end of each over and at the end of an innings. The
		file is subject to the normal PSION naming standards and may
		be located anywhere in internal memory or on an SSD, but
		will be placed in \OPD directory, unless a different one is
		specified. This file contains the latest scorecard as a
		backup during an innings and can be used as the final
		scorecard at the end of the innings. As a complete file
		is written at the end of each over, it would be better to use
		internal memory or a RAM SSD, rather than a flash SSD.
	Weather conditions (I)
	Pitch conditions (I)
	Overs limit for Innings (I)
		If a time match has been entered, this is suppressed.
	First Innings (I)
	    Runs
	    Wickets
	    Overs
	    Balls
		This dialog only appears on the unregistered version to
		enable previous innings details to be entered so that match
		results can be calculated. Leave these fields blank, except
		for the last innings of a match.
		If team names, or batting side, have not been entered, a
		warning message only will appear, as there will have been
		insufficient data entered.
		If runs are set to zero, or blank, the other three fields will also be initialised.
	Opening batsmen and bowler

Scoreboard:
The scoreboard shows the current situation in the innings. The current total,
the current Batsmen's scores and which one is facing, the number of wickets
fallen, total at fall of the last wicket, last batsman's score and overs
bowled are updated for each delivery.
The deliveries bowled in the current over are shown at the bottom of the
display, with runs shown in black and extras in grey. Where both runs and
extras have been scored of one delivery, ('include' option for penalty runs)
the line above will be utilised, which will result in the normally shown 
information temporarily disappearing.
Should there be more deliveries than will fit across the bottom of the
screen, the earliest will be lost.

Functions:
Player Names
It is only necessary to input any player's name once in a match. Whenever a
player is selected, a list of all the names already entered for the team is
presented. From this list, a name can be selected and subsequently amended.
Also on the list are; '(none)', to allow a name to be left blank; '(new)'
to allow entry of a new name, if eleven names have not already been
entered; 'Sub' for substitute fielder on a list of fielders. Names already
appearing on the batting or bowling details screens will not appear in
these lists. The bowler will not appear on the list of fielder names. Only
the names of players who have bowled a ball will appear on the list of
bowlers when changing a batsman's details. If there are no previously
entered names, the name can be entered immediately.
The simplest way to think of this is that the list is really a list of
players, one of which is selected and their name entered or amended.
Amending one instance of a name will change all instances in that innings.
Display Batting Details (DIAMOND)
This screen shows the current batting details. It highlights the number of
the batsmen currently facing, and allows the input, or amendment, of batsmen
and fielders' names. Use the cursor keys to select the name, then press
Enter to change it. Batsmen names can also be input as each one comes to the
wicket.
The details for each batsman (howout, runs, balls, etc) can be adjusted
by using SHIFT and ENTER. This facility can only be used to make adjustments
to the score, not to change the state of the game. A batsman can not be made
out from not out and vice versa, but his runs or balls faced can be adjusted.
Once a batsman is out, the method of dismissal or the bowler can be changed.
Confirmation is prompted for, before any changes are applied.
From this screen, PSION and E can be used to adjust the extras.
The extras and total fields will be automatically changed to reflect any
adjustments made.

Display Bowling Details (SHIFT + DIAMOND)
This screen shows the current bowling details. It highlights the number of
the  bowler bowling the current over, and allows the input, or amendment, of
bowlers' names. Use the cursor keys to select the name, then press Enter to
change it. When an 'empty' row is left on this screen (name blank and all 
details zero), it is erased and the remaining rows are shuffled up on exit
from the screen. Bowlers' names can also be input as they are selected for
the next over.
The details for each bowler (runs, wides, etc) can be adjusted by using
SHIFT and ENTER. Note that the balls for the current over can not be changed,
as these are temporary and will be reset at the end of the over. 
Confirmation is prompted for, before any changes are applied. When an 'empty'
row is left on this screen (name blank and all details zero), it is erased
and the remaining rows are shuffled up on exit from the screen if a file is
printed from the bowling details screen.
From this screen, PSION and W can be used to adjust the fall of wickets.
It is only possible to change the details of wickets already fallen, and not
reduce or increase the number of wickets. The minutes field can be left blank.
Over details can be adjusted in a similar way by using PSION and O.
This screen is also displayed between overs to enable the bowler to be
selected for the next over. A bowler must always be selected, therefore
escape and diamond keys can not be used to exit this screen and wickets
and overs can not be adjusted between overs.

Mismatches
When returning from either the Batting or Bowling Details screen to the
scoreboard, warnings are given if any adjustments have resulted in mis-
matches in the data. It is the user's responsibility to investigate and
correct anything reported. The checks carried out are:
	Fall of wkt			-	the runs or minutes decrease from one wicket to the
										next, or to the final situation, or the batsmen out
										do not match the batting details.
	Over analysis		-	the runs or wickets decrease from one over to the
										next, or to the final situation.
	Overs						-	the bowlers' overs do not match the number bowled
										in the match. Note that this check takes into
										account any overs split between more than one bowler.
	Runs						- the number of runs do not match between batting
										and bowling details.
	Balls						-	the number of balls do not match between batting
										and bowling details.
	Wickets					-	the bowlers' wickets do not match the batsmen out

Match details (PSION + m)
Allows correction, or late input, of match details, as per Initial entry
(Items marked M). Note that only the current innings' print will reflect
changes made here. Previous innings' files will need to be changed manually.
Input of team names for the first time using this process will also prompt
for the team batting.

Innings details (PSION + i)
Allows correction, or late input, of current innings details, as per the
Initial entry (Items marked I).

Reset overs (PSION + o)
This is only available for time matches and resets the overs displayed on
the scoreboard to zero. This can be used to facilitate counting the number
of overs bowled in the last hour of a time match or the number of overs
bowled since a new ball.

End innings (PSION + e)
This should be used at the end of any innings which finishes without the
batting side being all out, or the maximum number of overs being bowled in a
limited overs match, or the required runs being scored by a team batting
last, e.g. a declaration. It indicates to the computer that the innings is
finished and annotates the print files accordingly. Non-use of this will
leave the print files appearing as if the game was still in progress. This
function is done automatically when the one of the above criteria are met.

Abandon match (PSION + SHIFT + e)
This indicates to the computer that the innings is finished, as above, but
also allows the scorer to input a comment to appear in the print files
as a result, e.g. 'Match Abandoned - Rain'. If this process is not used,
the program will assume the match has completed and try to calculate a result
based on the scores. Any comment entered can be amended by using the Result
function.

File Innings (PSION + f)
This facility allows the innings' details to be printed. In order to keep
the program size to a minimum, allow electronic storage and make use of the
computer's extensive word processing facilities, the innings' details are
not written directly to a printer, but written to a file on the PSION. The
files produced are in ASCII text format and can be edited and printed using
WORD, or a text editor.
The facility can be used from any of the three display screens.
A dialog offers the choice of whether to write the full scorebook or the
summary scorecard to file. The name of the file to be written to is then
prompted for, which will be placed in \OPD directory, unless a different one
is specified. If, however a scorecard is required mid-innings, a different
file must be used to the regular print file, as it will be overwritten at
the end of the next over.
The SCOREBOOK option produces a file containing the full innings' details,
similar to a cricket scorebook. The only details not included are the
batsmen's scoring strokes and the full ball-by-ball bowling analysis of
each over. In order to print correctly, the page setup parameters will need
adjusting, depending on the application and printer being used, If using
WORD, landscape orientation, with all margins set to 2.5 cm should be used.
The print will be over two pages.
The SCORECARD option produces a file containing summary innings' details,
suitable for sending to the press or a league's administration. In order to
print, the page setup parameters will need adjusting, depending on the
application and printer being used. If using WORD, portrait orientation,
with left and right margins 1.0 cm should be used. The print will be on a
single page.
Note that if the team names are not entered, the result can not be
determined and will not appear in either of the print files. Also, the
definitions of drawn and tied matches can vary greatly in different
competitions. The result calculated by PSCORE may need to be changed,
where, for example, wickets then scoring rates are not used to
determine a result, in the event of runs scored being equal in an overs
match.

Run Rates (PSION + r)
This function displays, for overs matches, the current runs per over and,
for the second innings, the required runs per over at the start of the
innings and the current and revised runs per overs as the innings progresses.
For time matches, it displays the overs bowled per hour.

New Innings (PSION + n)
Only available when registered
Initialises the application ready for the next innings. Match details are
retained, and dialogs prompt for the new innings' details. The runs required
(time match) or 1st Inns (overs match) will be calculated and displayed on
the scoreboard when the last innings of the match is reached. If a team has
followed on and has not scored enough runs to make their opponents bat again,
a fourth innings will not be started.
Once a new innings has been started, the previous innings' details are lost
and can not be changed apart from on the print files.

Adjust Totals (PSION + j)
Allows adjustment to the total of any previous innings, if, for example, the 
umpires direct an alteration to be made to the score. It only adjusts the innings'
total and it will be the responsibility of the scorer to adjust the
details on the print files. Using this will maintain the match situation.
removed

Result (PSION + Shift + r)
This option will only be available once an innings has finished and only if the
batting team has been entered.
It can be used to alter the result calculated by Pscore at the end of a match or
entered using the Abandon function. Any entered result will always replace the
calculated result. The program will calculate the result again if the field is
reset to blank.
This function will be of most use when league rules for tied or drawn matches
are not the same as those Pscore uses.

Exit Program (PSION + x)
PSCORE can be exited from any of the three displays, but once it has been
left, it can not be restarted and all the current match's details will be
lost. A dialog will prompt for confirmation that the scorer wishes to exit
and a further confirmation will be sought if the current innings or match
has not been completed.

About  (PSION + b)
This function displays information on the application, including current
version and registration details.

Help (Help)
The source for the online help is in file PSCORE.HLP, which can be deleted
if space is a problem on your machine.

Play:
Deliveries
All input can be in upper case or lower case.
Batsmen will be swapped automatically when an odd number of runs are scored,
whether off the bat or as extras

Dot ball (.)
	Ensure all dot balls are entered, otherwise the ball count will be
	incorrect.
Runs (1 thru 9)
Byes (CONTROL + . then b)
	A dialog prompts for the number of byes scored
Leg Byes (CONTROL + . then l)
	A dialog prompts for the number of leg byes scored
Wide (x)
	A dialog allows the scorer to select the number of wides. 'No run'
	will result in the default number of wides, entered during the
	match start processing, to be scored by the computer. Selecting one
	of the other types of runs will result in a further dialog allowing
	the input of the number of wides scored (plus penalty runs if
	appropriate).
	NOTE - if the batsmen do not run, always select 'no run', otherwise
	the batsman facing may be wrongly changed, but if they cross for a
	single, enter 1 wide.
No Ball (o)
	A dialog allows the scorer to select the type of runs off the no
	ball - No run, Runs off bat, Byes, Leg Byes and No Balls. 'No run'
	will result in the default number of no balls, entered during the match
	start processing, to be scored by the computer. Selecting one of the other
	types of runs will result in a further dialog allowing the input of
	the number of no balls scored (plus penalty runs if appropriate).
	NOTE - if the batsmen do not run, always select 'no run', otherwise
	the batsman facing may be wrongly changed, but if they cross for a
	single, enter 1 run or extra.
Wicket (w)
	A  dialog allows the selection of the type of wicket. This must be
	used for ALL wicket types, even those not credited to the bowler.
	The program will prompt for the type of delivery, any runs or extras
	scored and record the batting and bowling details appropriately.
	If any previous batsman has retired not out, a dialog will ask
	whether they are returning to the wicket. 
	The incoming batsman's name will be prompted for if necessary.
	For a catch, a dialog will appear asking whether the batsmen crossed
	If the wicket fell on the last ball of the over, do NOT take the end
	of the over into account, as the batsmen will be swapped by the end
	of over processing.
	When the non-striker has been run out, the option 'Backing up' will
	become available on the Type of Delivery' choice list.
	For run out, obstructed field and handled ball, a dialog will prompt
	for batsman facing the next ball. If the wicket fell on the last
	ball of the over, do NOT take the end of the over into account, as
	the batsmen will be swapped by the end of over processing.
	Timed Out can only be entered as long as play has not been resumed
	(a delivery has been input) since the last wicket  

Non-deliveries
Retired (PSION + h)
	A dialog will ask which batsman is retiring, followed by a further
	one asking if they were not out or out.
	If any previous batsman has retired not out, a dialog will ask
	whether they are returning to the wicket. The incoming batsman's
	name will be prompted for if necessary.
Absent (PSION + a)
	The last batsman to arrive at the wicket will be set to Absent, as
	long as play has not been resumed (a delivery has been input) since
	the last wicket.
One-Short (PSION + -)
	Subtracts 1 from the runs or extras off the last delivery. Runs must
	be input as the batsmen actually run, then input one short to ensure
	batsman facing is correctly maintained. DO NOT adjust the number of
	runs scored before input. When undo is used on a delivery, one short
	can not then be used on the preceding delivery.

Over Processing
Over Complete (CONTROL + o)
	If the number of balls input in the current over is less than the
	number of balls expected in an over, a dialog will ask the scorer
	to confirm the over is complete.
	The current scorecard is written to the print file.
	The  Bowling Details screen is displayed, to allow selection of the
	next bowler and it will prompt for the bowler's name, if necessary.
	The batsman facing is swapped automatically.
Bowler Hurt  (CONTROL + SHIFT + o)
	For use when a bowler is unable to complete an over and is replaced
	by another bowler mid-over. The Bowling Details screen is displayed,
	to allow selection of the new bowler, and it will prompt for their
	name if necessary.

Error Correction:
The ability to correct input errors in this program is not extensive, in
order to keep the size of the program to a minimum.
Swap batsman facing (PSION + s)
	This will swap the batsman facing. No other details are changed.
Swap  bowler (PSION + SHIFT + s)
	This will transfer all deliveries bowled in the  current over to a
	different bowler. The  Bowling Details screen is displayed, to allow
	selection of the new bowler and it will prompt for their name if
	necessary. Batting details will be updated for any wickets taken in
	the current over. When an 'empty' row is left on this screen (name
	blank and all details zero), it is erased and the remaining rows are
	shuffled up on exit from the screen. 
	This function will only work on the current over and all previous
	overs will be unchanged. This is the only way to change the bowler,
	if the wrong one has been selected for the
	current over.
Undo (PSION + u)
	This will undo all input back to, and including, the last delivery.
	For example, if input has been:- 3 runs; one-short; retired hurt;
	new batsman's name; over; bowler's name; then Undo will restore the
	scoreboard to it's state before the 3 runs were input. If the 
	erroneous input had been the over completion, the 3 runs, one-short,
	retired hurt and new batsman's name would need to be input again
	before the next delivery is entered.

Miscellaneous:
Computer Failure
	As the game will inevitably continue, and the scorer will not have
	time to sort out the computer, in the event of a complete failure
	there is no facility to 'reload' the match and continue scoring on
	the PSION.
Timing
	Timing of the innings and the opening batsmen commences when the
	first delivery is entered into the computer. When a wicket is
	entered, the timing of the outgoing batsmen ends and the incoming
	batsman commences, as the wicket is processed. The innings' finish
	time is taken as being that when the last wicket falls. Delaying
	these inputs will result in incorrect timings being recorded.
	All timings are rounded to the nearest full minute. If no delivery
	has been input for five minutes, a dialog is displayed asking if
	there has been a break in play. If the reply is Y, the time from
	the previous delivery to this one is subtracted from the two
	batsmen's time at the wicket. This allows adjustment of time for
	interruptions in play.
Innings Completion
	When the computer identifies that the innings has finished, it will
	prevent further input and write the final scorecard to file.  The
	conditions that result in this are:
		Overs completed in limited overs match
		Required runs scored by side batting second
		Batting side all out
		Manual end or abandon innings
	Undoing the last delivery, adjusting the innings' totals, or
	changing the number of overs will reset the innings and allow
	further input, unless the innings has been manually ended. Note that
	if the innings has not been completed, either automatically or
	manually, the print files will not reflect the end of the
	innings.
Exit
	Exiting the application from the system screen is only possible when
	it has been left at either the scoreboard, batting or bowling 
	details. The current scorecard is written to the file as part of the
	exit processing. Once exited, PSCORE can not be restarted and all
	the current match's details will be lost.

History:
  Ver.   Date     Reason
  0.1    Mar '97  Beta test
  1.0    May '97  First version
  2.0    Aug '97  Various minor bug fixes
                  Whole match scoring introduced
                  On-line help added
  2.1    Nov '97  Siena displays corrected
                  Wicket and over processing improved
  2.2    Apr '99  Adjustments from detail screens during match
                  Option to score penalty runs when other runs scored off
                  wides and no balls
                  Run out backing up and no balls scored off an attempt added
  2.3    Jun '99  Single entry of player names
                  Print and exit capabilities added to details screens
                  Adjustment to result
  2.3a   Jul '99  Fixed bug in changing details of not out batsmen
